"""
@name : changegift
@author : wenyao
@projectname: sanchuanglianxi
"""

# import random
# students = ['a','b','c','d']
#
# students1 = list(students)
# students2 = list(students)
#
# for i in range(len(students)):
#     num1 = random.randint(0, len(students1)-1)
#     num2 = random.randint(0, len(students2)-1)
#     send_people = students1[num1]
#     students1.pop(num1)
#     receive_people = students2[num2]
#     students2.pop(num2)
#     print(f"{send_people}送礼物给{receive_people}")


# import random
# students = {"a","b","c","d","e"}
# # 收礼物的人
# recv_student = set()
# # 还有哪些人没有收礼物
# rest_student = students
# # 结果
# peidui = {}
#
# for item in students:
#     # 从还有哪些人没有收礼物选择一个人
#     # minzi = ''.join(random.sample(rest_student, 1))
#     minzi = random.sample(rest_student, 1)[0]
#     peidui[item] = minzi
#     recv_student.add(minzi)
#     rest_student = students - recv_student
# print(peidui)

# import random
# #公司员工
# student = ["a","b","c","d","e"]
# #没有收到礼物的人
# student2 =  student[:]
# print(student, student2)
#
# for i in student:
#     flag = 0
#     if i in student2:
#         flag = 1
#         student2.remove(i)
#     get = random.choice(student2)
#     student2.remove(get)
#     if flag == 1:
#        student2.append(i)
#     print(f"{i}送给{get}")